package com.white.service.imp;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.white.bean.Follow;
import com.white.bean.FollowView;
import com.white.mapper.FollowMapper;
import com.white.service.FollowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FollowServiceImpl extends ServiceImpl<FollowMapper, Follow> implements FollowService {
    @Autowired
    FollowMapper followMapper;
    @Override
    public List<Follow> mySearch(Follow follow) {
        return followMapper.mySearch(follow);
    }

    @Override
    public List<FollowView> getFollowById(Long userId) {
        return followMapper.getFollowById(userId);
    }

    @Override
    public List<FollowView> getFanById(Long userId) {
        return followMapper.getFanById(userId);
    }

    @Override
    public void delete(Follow follow) {
        followMapper.myDelete(follow);
    }

}
